//
//  StatusRetweetView.swift
//  swiftImitationWeibo
//
//  Created by 杨果果 on 16/7/13.
//  Copyright © 2016年 yang. All rights reserved.
//

import UIKit

class StatusRetweetView: UIView {

    var statuesViewModel: StatueViewModel? {
        didSet {

            contentLabel.text = statuesViewModel?.retweetContent
        }
    }
    
    //加载控件
    private lazy var contentLabel: UILabel = {
        let label = UILabel(textColor: UIColor.grayColor(), fontSize: 15)
        label.numberOfLines = 0
        return label
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    private func setupUI() {
        
        addSubview(contentLabel)
        
        contentLabel.snp_makeConstraints { (make) -> Void in
            make.top.equalTo(self).offset(HomeCellMargin)
            make.leading.equalTo(self).offset(HomeCellMargin)
            make.trailing.equalTo(self).offset(-HomeCellMargin)
        }
        self.snp_makeConstraints { (make) -> Void in
            make.bottom.equalTo(contentLabel).offset(HomeCellMargin)
        }
    }

}
